import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}


// 神椰勋章配置列表
export function advertisementList(query) {
  return request({
    url: '/shenye/advertisement/config/list',
    method: 'get',
    params: query
  })
}
// 查询神椰打卡活动下拉框
export function punchActivitySelect() {
    return request({
      url: '/shenye/advertisement/config/punchActivitySelect',
      method: 'get',
    })
  }
// 铸造勋章选择列表
export function cardList(query) {
    return request({
      url: '/shenye/medal/equity/card/list',
      method: 'get',
      params: query
    })
}
// 新增神椰勋章
export function addAdvertisement(data) {
  return request({
    url: '/shenye/advertisement/config', 
    method: 'post',
    data: data
  })
}
// 神椰广告配置详情
export function advertisementInfo(id) {
  return request({
    url: `/shenye/advertisement/config/detail/${id}`,
    method: 'get'
  })
}
// 编辑 神椰广告配置
export function editAdvertisement(data) {
  return request({
    url: '/shenye/advertisement/config',
    method: 'put',
    data: data
  })
}

// 改变激励状态[启用-停用]
export function medalShowStatus(data) {
    return request({
      url: '/shenye/medal/show/status',
      method: 'put',
      data: data
    })
  }

//神椰广告配置显示-隐藏
export function advertisementStatus(id) {
    return request({
      url: `/shenye/advertisement/config/change/${id}`,
      method: 'put',
    })
  }

//神椰广告配置删除
export function advertisementDelete(id) {
  return request({
      url: `/shenye/advertisement/config/${id}`,
      method: 'DELETE',
  })
}
//神椰广告配置 轮播图跳转下拉
export function bannerSelect(data) {
  return request({
    url: `/shenye/advertisement/config/banner/select`,
    method: 'get',
    params: data
  })
}